package com.easylinkin.linkappapi.lobar.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;
import java.util.Set;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户闸机绑定表
 * </p>
 *
 * @author kanyuanfeng
 * @since 2022-04-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("app_user_gate_link")
public class UserGateLink extends Model<UserGateLink> {

    private static final long serialVersionUID = 1L;

    /**
     * ID 主键自增
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 项目ID(linkapp_tenant)
     */
    @TableField("tenant_id_")
    private String tenantId;

    /**
     * 闸机id
     */
    @TableField("gate_id_")
    private String gateId;

    /**
     * 用户/访客id type为1userID 2访客申请表id
     */
    @TableField("user_id_")
    private String userId;

    /**
     * 创建人id
     */
    @TableField("creator_id_")
    private Long creatorId;

    /**
     * 创建日期
     */
    @TableField("create_time_")
    private Date createTime;

    /**
     * 修改人id
     */
    @TableField("modify_id_")
    private Long modifyId;

    /**
     * 修改时间
     */
    @TableField("modify_time_")
    private Date modifyTime;

    /**
     * 备注
     */
    @TableField("remark_")
    private String remark;

    /**
     * id集合
     * @return
     */
    @TableField(exist = false)
    private Set<Integer> ids;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
